import subprocess

cmd = [
    "/usr/lib/jvm/java-11-openjdk-amd64/bin/java",
    "-cp", "out:CDF_JMJ_API-1.4.jar:CDFJCE-2.1.2.jar:CDF_JMJ_JNI-1.4.jar:CDFSoft-2.2.jar",
    "-Djava.library.path=/usr/lib",
    "JCECrypto",
    "encrypt",
    "-cert", "MIIBoTCCAUWgAwIBAgIIRcqC+k8GG5YwDAYIKoEcz1UBg3UFADAhMQswCQYDVQQGEwJDTjESMBAGA1UEAwwJ5qC56K+B5LmmMCAXDTIzMTAxMDE2MDAwMFoYDzIwNTMxMDAyMT6wMDA0WjAhMQswCQYDVQQGEwJDTjESMBAGA1UEAwwJ5qC56K+B5LmmMFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEuU1w2nF9qRirc78jRFZLZ/RVQLUMXUi9IdofqQTgAVQFXayqewvCYZkBKXdOWyXjl6goUwBcp7AHBdQIFtfQU6NjMGEwHwYDVR0jBBgwFoAUmNcVyA4Q/Vfrrm1CUSBOumpHPk4wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAc4wHQYDVR0OBBYEFJjXFcgOEP1X665tQlEgTrpqRz5OMAwGCCqBHM9VAYN1BQADSAAwRQIgdquZAwZCXLtUZPLFds9d2mDRYhYqVt0JVEaNYwxNcM8CIQDudMwc2f5JU9GI/BMyq0El5ww2Bx6GQM2Iq2AxBsptcQ==",
    "-data", "AAECAwQFBgcICQoLDA0ODw=="
]

result = subprocess.run(cmd, capture_output=True, text=True)

print("stdout:", result.stdout)
print("stderr:", result.stderr)
